<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class BaseController</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> BaseController</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|													<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">BaseControllerクラス</p>
<p class="description"><p>各コントローラーのスーパークラス。  以下のような処理を受け持つ。 <ul><li>ビュー周りの処理</li><li>リダイレクトなどHTTPヘッダ周り</li><li>バリデーション</li><li>メール送信</li></ul></p></p>
	<ul class="tags">
				<li><span class="field">author:</span> M.Katsube &lt;<a href="mailto:">katsubemakito@gmail.com   katsubemakito@gmail.com</a>&gt;</li>
				<li><span class="field">copyright:</span> 2010 WingPHP</li>
				<li><span class="field">access:</span> public</li>
				<li><span class="field">license:</span> The</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_controller---base.php.html">/controller/base.php</a> (line <span class="field">42</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../media/images/Class.png"
								 alt=" class"
								 title=" class"
								 style="vertical-align: center"/>
						<a href="../ErrorController/ErrorController.html">ErrorController</a>
					</td>
					<td>
											ErrorControllerクラス
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../media/images/Class.png"
								 alt=" class"
								 title=" class"
								 style="vertical-align: center"/>
						<a href="../IndexController/IndexController.html">IndexController</a>
					</td>
					<td>
											IndexControllerクラス
										</td>
				</tr>
							</table>
		</div>
	</div>



	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																<div class="method-definition">
					<img src="../media/images/Constructor.png" alt=" "/>
											<span class="method-result">BaseController</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Destructor.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#__destruct" title="details" class="method-name">__destruct</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#assign" title="details" class="method-name">assign</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#check" title="details" class="method-name">check</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$rule</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#display" title="details" class="method-name">display</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#location" title="details" class="method-name">location</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$sec</span> = <span class="var-default">0</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#sendmail" title="details" class="method-name">sendmail</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">mixed</span>
										<a href="#smarty" title="details" class="method-name">smarty</a>
										()
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
													<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">55</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">コンストラクタ</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">BaseController</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../ErrorController/ErrorController.html#method__construct">ErrorController::__construct()</a>
								: コンストラクタ
							</li>
					<li>
				<a href="../IndexController/IndexController.html#method__construct">IndexController::__construct()</a>
								: コンストラクタ
							</li>
				</ul>
	</div>
<a name="method__destruct" id="__destruct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Destructor.png" />
		<span class="method-title">Destructor __destruct</span> (line <span class="line-number">64</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">デストラクタ</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__destruct
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../ErrorController/ErrorController.html#method__destruct">ErrorController::__destruct()</a>
								: デストラクタ
							</li>
					<li>
				<a href="../IndexController/IndexController.html#method__destruct">IndexController::__destruct()</a>
								: デストラクタ
							</li>
				</ul>
	</div>
<a name="methodassign" id="assign"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">assign</span> (line <span class="line-number">98</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">view(Smarty)に値をセットする</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			assign
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$key</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$key</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcheck" id="check"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">check</span> (line <span class="line-number">166</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">バリデーションを行う</p>
<p class="description"><p>key-value型の配列のvalueに対してバリデーションを実施する。  第二引数 $ruleも同様にkey-value型の配列であり、このvalueにルールを  記述する。    ※つまり第一引数と第二引数のキーはリンクしている</p><p>Example. <div class="src-code"><ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-var">$q&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../QueryModel/QueryModel.html">QueryModel</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-var">$ret&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../BaseController/BaseController.html#methodcheck">check</a><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$q</span><span class="src-sym">-&gt;</span><span class="src-id">data</span><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'key1'</span>=&gt;<span class="src-str">'ALNUM'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'key2'</span>=&gt;<span class="src-str">'/^([0-9a-zA-Z]{1,})$/'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../BaseController/BaseController.html#methodsmarty">smarty</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><a href="../BaseController/BaseController.html#methodassign">assign</a><span class="src-sym">(</span><span class="src-str">'validation'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$ret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> array( result=&gt;true|false, data=&gt;array( key1=&gt;true|false, key2=&gt;true|false ... ) )</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			check
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$rule</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$data</span><span class="var-description">: array(key1=&gt;'value1', key2=&gt;'value2' ...)</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$rule</span><span class="var-description">: array(key1=&gt;'ALNUM',  key2=&gt;'/^([0-9a-zA-Z]{1,})$/' ...)</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddisplay" id="display"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">display</span> (line <span class="line-number">115</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">viewを出力する</p>
	<ul class="tags">
				<li><span class="field">todo:</span> キャッシュ関連の対応を行う。</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			display
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlocation" id="location"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">location</span> (line <span class="line-number">132</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">指定URL(パス)へ遷移する</p>
<p class="description"><p>HTTPヘッダがまだ送信されていない場合はLocationヘッダで、  すでに送信されている場合はmeta要素を出力する</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			location
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$sec</span> = <span class="var-default">0</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: URL(パス)</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$sec</span><span class="var-description">: 遷移までの秒数(meta出力時のみ有効)</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsendmail" id="sendmail"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">sendmail</span> (line <span class="line-number">192</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">メール送信ラッパー</p>
<p class="description"><p>mb_send_mailの簡易ラッパー。将来的にもろもろ拡張予定。</p><p>Example. <div class="src-code"><ol><li><div class="src-line">&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../BaseController/BaseController.html#methodsendmail">sendmail</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'subject'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'メールの件名'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-str">'from'&nbsp;&nbsp;&nbsp;&nbsp;</span>=&gt;&nbsp;<span class="src-str">'from@example.com'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-str">'to'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&gt;&nbsp;<span class="src-str">'to@example.com'</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">,&nbsp;</span><span class="src-str">'body'&nbsp;&nbsp;&nbsp;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$body</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">))</span><span class="src-sym">;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			sendmail
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$data</span><span class="var-description">: array('subject'=&gt;'件名', 'from'=&gt;'送信者', 'to'=&gt;'宛先', 'body'=&gt;'本文')</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsmarty" id="smarty"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">smarty</span> (line <span class="line-number">84</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">view用のSmartyオブジェクトを返却</p>
	<ul class="tags">
				<li><span class="field">return:</span> Smartyオブジェクト</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			smarty
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Wed, 04 Aug 2010 16:50:05 +0900 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>